$OpenBSD: patch-source_blender_render_intern_source_shadbuf_c,v 1.9 2015/01/10 00:30:49 pascal Exp $
--- source/blender/render/intern/source/shadbuf.c.orig	Sun Jan  4 15:13:39 2015
+++ source/blender/render/intern/source/shadbuf.c	Fri Jan  9 19:50:19 2015
@@ -1039,7 +1039,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 {
 	float temp;
 	int *rz, ofs;
-	int zsamp=0;
+	long zsamp=0;
 	char *ct, *cz;
 
 	/* simpleclip */
@@ -1068,7 +1068,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 	else if (*ct==2) {
 		ct= ((char *)rz);
 		ct+= 4+2*16*(ys & 15)+2*(xs & 15);
-		zsamp= *rz;
+		zsamp= (long)*rz;
 	
 		cz= (char *)&zsamp;
 		cz[BCOMP]= ct[0];
@@ -1077,7 +1077,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf
 	else if (*ct==1) {
 		ct= ((char *)rz);
 		ct+= 4+16*(ys & 15)+(xs & 15);
-		zsamp= *rz;
+		zsamp= (long)*rz;
 
 		cz= (char *)&zsamp;
 		cz[GCOMP]= ct[0];
@@ -1226,7 +1226,8 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSamp
 {
 	float temp;
 	int *rz, ofs;
-	int bias, zbias, zsamp;
+	int bias, zbias;
+	long zsamp;
 	char *ct, *cz;
 
 	/* negative! The other side is more important */
@@ -1252,7 +1253,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSamp
 	else if (*ct==2) {
 		ct= ((char *)rz);
 		ct+= 4+2*16*(ys & 15)+2*(xs & 15);
-		zsamp= *rz;
+		zsamp= (long)*rz;
 	
 		cz= (char *)&zsamp;
 		cz[BCOMP]= ct[0];
@@ -1261,7 +1262,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSamp
 	else if (*ct==1) {
 		ct= ((char *)rz);
 		ct+= 4+16*(ys & 15)+(xs & 15);
-		zsamp= *rz;
+		zsamp= (long)*rz;
 
 		cz= (char *)&zsamp;
 		cz[GCOMP]= ct[0];
